Skip to content

Fix wrong color range#1088

Open
MontyTRC89 wants to merge 20 commits intodevelopfrom
fix_color_range
Open

Fix wrong color range#1088
MontyTRC89 wants to merge 20 commits intodevelopfrom
fix_color_range

Conversation

@MontyTRC89
Copy link
Copy Markdown
Collaborator

This pull request addresses the old bug about the 0.0f - 2.0f color range. After merging this pull request, TE will emit colors in 0.0f - 1.0f range for TEN target.

@MontyTRC89 MontyTRC89 requested review from Lwmte and Sezzary December 2, 2025 10:59
@Lwmte Lwmte added this to the Version 2.0 milestone Mar 23, 2026
@Lwmte Lwmte requested a review from Copilot March 23, 2026 23:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts TombEngine (TEN) level compilation to emit normalized color values, addressing the longstanding issue where exported colors were effectively in a 0.0–2.0 range instead of 0.0–1.0.

Changes:

  • Normalizes room ambient light, vertex colors, static mesh tint, and dynamic light colors for TombEngine export.
  • Normalizes item/static instance color tint written into TombEngine item tables.
  • Updates custom-vertex lighting normalization logic to target a 0..1 output range.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
TombLib/TombLib/LevelData/Compilers/TombEngine/Rooms.cs Applies multiple color normalization steps for room geometry, ambient, static meshes, vertex colors, and dynamic lights in TEN export.
TombLib/TombLib/LevelData/Compilers/TombEngine/LevelCompilerTombEngine.cs Normalizes exported item tint color for TEN items table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread TombLib/TombLib/LevelData/Compilers/TombEngine/Rooms.cs Outdated
Comment thread TombLib/TombLib/LevelData/Compilers/TombEngine/Rooms.cs Outdated
Comment thread TombLib/TombLib/LevelData/Compilers/TombEngine/Rooms.cs
Comment thread TombLib/TombLib/LevelData/Compilers/TombEngine/LevelCompilerTombEngine.cs Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread TombLib/TombLib/LevelData/Compilers/TombEngine/Rooms.cs
Comment thread TombLib/TombLib/LevelData/Compilers/TombEngine/Rooms.cs
Comment thread TombLib/TombLib/LevelData/Compilers/TombEngine/Rooms.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants